/*
 * Copyright 2010 Michael Nitsche
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package de.mnit.basis.sys.datei;

import java.io.File;

/**
 * @author Michael Nitsche
 * 28.09.2007	Erstellt
 *
 * TODO Könnte man wirklich besser globalisieren!
 */
public abstract class A_DS_Element implements S_DS_Element {

	protected File file;


	public boolean equals(Object o) {
		if(o instanceof S_DS_Element)
			return istGleich((S_DS_Element)o);
		else
			return false;
	}

	public boolean istGleich(S_DS_Element a) {
		return a.gPfadKomplett().equals(this.gPfadKomplett());
	}

	public boolean istVersteckt() {
		return this.file.isHidden();
	}

	public String toString() {
		return this.file.toString();
	}

	public String gPfadKomplett() {
		return this.file.getAbsolutePath();
	}

	public boolean existiert() {
		return this.file.exists();
	}

	public File gFile() {
		return this.file;
	}

}
